package com.bjpowernode.service;

import com.bjpowernode.POJO.ProductInfo;
import com.bjpowernode.service.request.PageAndPNameAndTypeIdAndpPriceLikeQuery;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

public interface ProductInfoService {

    // 显示全部的商品(不分页)
    List<ProductInfo> getAll();

    // 分页设置
    PageInfo<ProductInfo> splitPage( Integer currentPage,int pageSize);

    int save(ProductInfo info);

    // 根据 id 查询单个商品信息
    ProductInfo getById(Integer id);

    // 模糊查询
    PageInfo<ProductInfo> selectByCondition(PageAndPNameAndTypeIdAndpPriceLikeQuery likeQuery,int pageSize);


    int update(ProductInfo info);

    int deleteById(Integer pid);

    int deleteBatch(int[] pids);
}
